package org.bp.spider.util;

import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;

public interface ExcelInsertDataEvent {
	/**
	 * eg:
	 * new ExcelInsertDataEvent() {
			@Override
			public Row insertData(Sheet sheet,int rowNum) {
				Row row = null;
				for (int i = 0; i < list.size(); i++) {
					row = sheet.createRow(i + rowNum);
					row.setHeight((short) 500);
					row.createCell(0).setCellValue((list.get(i)).getName());
					row.createCell(1).setCellValue((list.get(i)).getBoss());
					row.createCell(2).setCellValue((list.get(i)).getPhone());
					row.createCell(3).setCellValue((list.get(i)).getEmail());
					row.createCell(4).setCellValue((list.get(i)).getAddress());
				}
				return row;
			}
		});
	 * @param sheet sheet
	 * @param rowNum 从哪一行开始插入
	 * @return
	 */
	public Row insertData(Sheet sheet, int rowNum);
	
}
